#!/usr/bin/env python
#    dft_camb3lyp_magsus 
#    ----------------------
#    Molecule:         HOF
#    Wave Function:    DFT (CAM-B3LYP) / 6-31G** 
#    Test Purpose:     Test magnetizability and molecular
#                      rotational g-factor calculation with
#                      Coulomb attenuated functional 

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()
f.add(string = 'Final DFT energy',
      rel_tolerance = 1.0e-8)

f.add(from_string = 'Total magnetizability tensor (au)',
      num_lines = 9,
      abs_tolerance = 1.0e-5)

f.add(from_string = 'Molecular rotational g-tensor in principal axis system (a.u.):',
      num_lines = 32,
      abs_tolerance = 1.0e-5)


test.run(['dft_camb3lyp_magsus.dal'], ['HOF_6-31Gss.mol'], f={'out': f})

sys.exit(test.return_code)
